package gsw.common;

import android.Manifest;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import java.util.ArrayList;
import java.util.List;

import gsw.common.aop.ActivityAOP;
import gsw.common.login.loginFinger.ActivityLoginFinger;
import gsw.common.ndk.ActivityNDK;
import gsw.common.share.ActivityShare;
import gsw.common.ui.ActivityBigView;
import gsw.common.webView.ActivityWebView;

public class MainActivity extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        init();
    }

    private void init() {
        View.OnClickListener clickListener = new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (v.getId() == R.id.open_aop) {
                    Intent i = new Intent(MainActivity.this, ActivityAOP.class);
                    startActivity(i);
                } else if (v.getId() == R.id.open_ndk) {
                    Intent i = new Intent(MainActivity.this, ActivityNDK.class);
                    startActivity(i);
                } else if (v.getId() == R.id.open_share) {
                    Intent i = new Intent(MainActivity.this, ActivityShare.class);
                    startActivity(i);
                } else if (v.getId() == R.id.open_ui) {
                    Intent i = new Intent(MainActivity.this, ActivityBigView.class);
                    startActivity(i);
                } else if (v.getId() == R.id.open_login) {
                    Intent i = new Intent(MainActivity.this, ActivityLoginFinger.class);
                    startActivity(i);
                } else if (v.getId() == R.id.open_webView) {
                    Intent i = new Intent(MainActivity.this, ActivityWebView.class);
                    startActivity(i);
                }
            }
        };
        findViewById(R.id.open_aop).setOnClickListener(clickListener);
        findViewById(R.id.open_ndk).setOnClickListener(clickListener);
        findViewById(R.id.open_share).setOnClickListener(clickListener);
        findViewById(R.id.open_ui).setOnClickListener(clickListener);
        findViewById(R.id.open_login).setOnClickListener(clickListener);
        findViewById(R.id.open_webView).setOnClickListener(clickListener);
    }
}
